const http = uni.$u.http
function getConfig(config) {
    return {
        ...config,
        header: {
            Accept: 'application/json'
        }
    }
}
// post请求，获取菜单
export default {
    bannerList: (data, config = {}) => http.get('/banner/list'),
    newsList: (data, config = {}) => http.get('/news/list'),
    diagnosisList: (data, config = {}) => http.get('/diagnosis/list', data),
    diagnosis: (data, config = {}) => http.post('/diagnosis', data),
    diagnosisDetail: (id, config = {}) => http.get('/diagnosis/' + id),
    newsDetail: (id, config = {}) => http.get('/news/' + id),
    register: (data, config = {}) => http.post('/user', data),
    login: (data, config = {}) => http.post('/user/login', data),
    consultList: (data, config = {}) => http.get('/consult/list', data),
    consult: (data, config = {}) => http.post('/consult', data),
    consultDetail: (id, config = {}) => http.get('/consult/' + id),
    commentList: (data, config = {}) => http.get('/comment/list', data),
    comment: (data, config = {}) => http.post('/comment', data),
    commentDetail: (id, config = {}) => http.get('/comment/' + id),
}